remove_firewalld:
  pkg.removed:
    - name: firewalld
   
install_iptables:
  pkg.installed:
    - name: iptables-services
    - requrie:
      - pkg: remove_firewalld

iptables_running:
  service.running:
    - name: iptables
    - enable: True
    - requrie:
      - pkg: install_iptables
    - watch:
      - file: iptables_conf

iptables_conf:
  file.managed:
    - name: /etc/sysconfig/iptables
    - source: salt://iptables/iptables
    - user: root
    - group: root
    - mode: 600
 
